package com.gitee.hermer.engine.jars.app.sdk.configuration;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
//import com.baidu.disconf.client.DisconfMgrBean;
//import com.baidu.disconf.client.DisconfMgrBeanSecond;
//import com.gitee.hermer.boot.jee.commons.bean.utils.BeanLocator;
import com.gitee.hermer.boot.jee.commons.log.UtilsContext;
//
@Configuration
@Deprecated
/**
 * 暂时废弃
 * @author hermer
 *
 */
public class EngineAppDisConfAutoConfiguration extends UtilsContext implements Ordered,ApplicationContextAware{

	private ApplicationContext applicationContext;

	@Override
	public int getOrder() {
		return HIGHEST_PRECEDENCE+50;
	}
//
//	@Bean(destroyMethod = "destroy",initMethod="init")
//	@Order(HIGHEST_PRECEDENCE)
//	public DisconfMgrBeanSecond disconfMgrBeanSecond() {
//		DisconfMgrBeanSecond beanSecond = new DisconfMgrBeanSecond();
//		return beanSecond;
//	}
//
//	@Bean(destroyMethod = "destroy")
//	public DisconfMgrBean disconfMgrBean() throws IOException {
//		try{
//			DisconfMgrBean bean = new DisconfMgrBean();
//			bean.setScanPackage(BeanLocator.getBean(DisconfClientProperties.class).getScanPackage());
//			return bean;
//		}catch (Exception e) {
//			throw new IllegalStateException(e.getMessage(),e);
//		}
//	}
//
//
//
	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		this.applicationContext = applicationContext;
	}

}
